package ooday01;
//学生类
public class Student {
    //成员变量
    String name;//描述对象的属性
    int age;
    String className;
    String stuId;
    public Student() {
    }
    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    public Student(String name, int age, String className, String stuId) {
        this.name = name;
        this.age = age;
        this.className = className;
        this.stuId = stuId;
    }
    //方法
    void Study(){//         an.name
        System.out.println(name+"在学习");
    }

    void sayhi(){//                    an.name      an.age              an.className      an.stuId
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了，所在班级是"+className+"，学号是"+stuId);
    }

    void playWhith(String anotherName){
        //                   an.name
        System.out.println(name+"正在和"+anotherName+"一起玩");
    }
}
